package com.wy.dao.sys;

import com.domain.bean.sys.SysUser;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author : wangyu
 * Date: 2018-01-23
 * Time: 17:05
 */
public interface SysUserDAO extends BaseDAO<SysUser, String> {

    SysUser findByUserName(String username);
    @Query(value = "update SysUser su set su.password =:newPassWord where" +
            " su.id =:userId")
    void rePass(@Param("userId")String userId, @Param("newPassWord")String newPassWord);
}
